﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using OgilvyOne.UKNOW.EntityDB;
using System.Data;
using OgilvyOne.UKNow.BLL;
using OgilvyOne.UKNow.Model;

public partial class admin_UKNOW_Member_More : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        int mid=0;
        if (Request.Params["MemberId"] != "" && Request.Params["MemberId"] != null)
        {
            mid = int.Parse(Request.Params["MemberId"].ToString());
            if (mid > 0)
            {
                MemberModel model = new MemberBLL(2052).getMemberByID(Convert.ToInt32(mid));
                this.username.Text = model.Name;
                this.email.Text = model.Email;
                this.Mobile.Text = model.Mobile;
                this.StudyAbroad.Checked = model.StudyAbroad == "N" ? false : true;
                this.IELTS.Checked = model.IELTS == "N" ? false : true;
                this.Arts.Checked = model.ArtsAndCulture == "N" ? false : true;
                this.cbxSina.Checked = model.Sina == "N" ? false : true;
                this.cbxSohu.Checked = model.Sohu == "N" ? false : true;
                this.cbxTengxun.Checked = model.TengXun == "N" ? false : true;
                this.cbxSinaWeibo.Checked = model.SinaWeibo == "N" ? false : true;
                this.cbxTengxunWeibo.Checked = model.TengXunWeibo == "N" ? false : true;
                this.cbxRenren.Checked = model.RenRen == "N" ? false : true;
                this.cbxKaixin.Checked = model.KaiXin == "N" ? false : true;
                this.cbxDouban.Checked = model.DouBan == "N" ? false : true;
                this.cbxGoogle.Checked = model.Google == "N" ? false : true;
                this.cbxBaidu.Checked = model.Baidu == "N" ? false : true;
                this.cbxBing.Checked = model.Bing == "N" ? false : true;
                this.cbxOfflineEvents.Checked = model.OfflineEvents == "N" ? false : true;
                this.cbxNewspaper.Checked = model.NewsPaper == "N" ? false : true;
                this.cbxOutdoor.Checked = model.Outdoor == "N" ? false : true;
                this.cbxTaxi.Checked = model.Taxi == "N" ? false : true;
                this.cbxMetro.Checked = model.Metro == "N" ? false : true;
                this.cbxBBS.Checked = model.BBS == "N" ? false : true;
                this.cbxTV.Checked = model.TV == "N" ? false : true;
                this.cbxRecommendtion.Checked = model.Recommendation == "N" ? false : true;
            }
            else
            {
                Response.Write("<script>alert('该用户不存在')</script>");
                Response.Redirect("DelRegister.aspx?columnid=515&layerid=1,512,515");
            }
        }
        else
        {
            Response.Write("<script>alert('请选择会员')</script>");
            Response.Redirect("DelRegister.aspx?columnid=515&layerid=1,512,515");
        }
    }
    protected void lbBack_Click(object sender, EventArgs e)
    {
        Response.Redirect("DelRegister.aspx?columnid=515&layerid=1,512,515");
    }
}